<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <style>
        .x{
            display: flex;
            justify-content: end;
            width: 700px;
            height: 350px;
            background-color: aqua;
        }
        .x1{
            display: flex;
            align-items:end;
            width: 700px;
            height: 350px;
            background-color: aqua;
            margin-top: -20px;
        }
        .x span{
            width: 100px;
            height: 100px;
            background-color: red;
            margin: 20px;
            text-align:center;
        }
        .x1 span{
            width: 100px;
            height: 100px;
            background-color: red;
            margin: 20px;
            text-align:center;
        }
    </style>
        <p class="x">
            <span>1</span>
        </p>
        <p class="x1">
            <span>2</span>
        </p>
</body>
</html>